package com.angus.modules.front.service.impl;

import com.angus.api.front.domain.FrontOperLog;
import com.angus.modules.front.dto.OperLogDto;
import com.angus.modules.front.repository.FrontOperLogRepository;
import com.angus.modules.front.service.IFrontOperLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liyanan
 * @date 2024/10/17 2:11 PM
 * @description
 */
@Service
public class FrontOperLogServiceImpl implements IFrontOperLogService {


    @Resource
    private FrontOperLogRepository frontOperLogRepository;

    @Override
    public int insertOperlog(FrontOperLog operLog) {

       return frontOperLogRepository.insertOperlog(operLog);
    }

    @Override
    public List<FrontOperLog> selectOperLogList(OperLogDto dto) {

        return frontOperLogRepository.selectOperLogList(dto.getOperIp(),
                dto.getOperName(),dto.getTitle(),dto.getBusinessType(),
                dto.getStatus(),dto.getBeginTime(),dto.getEndTime());
    }

    @Override
    public int deleteOperLogByIds(List<Long> operIds) {
        frontOperLogRepository.deleteOperLogByIds(operIds);
        return 0;
    }

    @Override
    public FrontOperLog selectOperLogById(Long operId) {
        return null;
    }

    @Override
    public void cleanOperLog() {

        frontOperLogRepository.cleanOperLog();

    }
}
